#ifndef SEARCHHISTORYDIALOG_H
#define SEARCHHISTORYDIALOG_H

#include <QDialog>
#include <searchresult.h>
#include <QStringListModel>

namespace Ui {
class SearchHistoryDialog;
}

class SearchHistoryDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit SearchHistoryDialog(QWidget *parent = 0);
    ~SearchHistoryDialog();

    void loadData(QList<SearchResult *> searchResults);

public slots:
    void loadFoundRestaurants(const QModelIndex & index);

private:
    Ui::SearchHistoryDialog *ui;
    //The list model will be display a list of history location
    QStringListModel *locationModel;
    QStringListModel *restaurantsModel;

    // stored the search result for later used
    QList<SearchResult *> m_searchResults;
};

#endif // SEARCHHISTORYDIALOG_H
